<?php

/**
 * 分销基础类
 */

namespace app\sale\common;

class SaleCommon extends \app\member\common\MemberCommon {

    public $saleInfo = [];

    public function __construct() {
        parent::__construct();
        $this->saleInfo = target('sale/SaleUser')->getWhereInfo([
            'A.user_id' => $this->userInfo['user_id'],
            'agent' => 1
        ]);
        if(empty($this->saleInfo)) {
            $this->redirect(url('sale/Apply/index'));
        }

    }

}